package temp;

import cn.yunhe.model.Display;
import cn.yunhe.model.MainFrame;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

@Component("Computer")
@Scope("prototype")
public class Computer1 {
    @Autowired
    private MainFrame mainFrame;
    @Autowired
    @Qualifier("huaWeiDisplay")
    private Display dispaly;

    public void showComputer(){
        System.out.println("台式机的配置如下：");
        mainFrame.
                showMainFrame();
        dispaly.showDisplay();
    }

    public Computer1() {
    }

    public Computer1(MainFrame mainFrame, Display dispaly) {
        this.mainFrame = mainFrame;
        this.dispaly = dispaly;
    }

    public MainFrame getMainFrame() {
        return mainFrame;
    }

    public void setMainFrame(MainFrame mainFrame) {
        this.mainFrame = mainFrame;
    }



    public Display getDispaly() {
        return dispaly;
    }

    public void setDispaly(Display dispaly) {
        this.dispaly = dispaly;
    }
}
